<template>
  <div>
    <el-form label-width="100px">
      <el-form-item label="客户名称：">
        <div>{{ formData.customer_name }}</div>
      </el-form-item>
      <el-form-item label="检查时间：">
        <div>{{ $utils.dateFormat(formData.check_date, 'yyyy-MM-dd') }}</div>
      </el-form-item>
      <el-form-item label="检查人员：">
        <div>{{ formData.check_person }}</div>
      </el-form-item>
      <el-form-item label="批次号：">
        <div>{{ formData.batch_no }}</div>
      </el-form-item>
      <el-form-item label="检查方式：">
        <div>{{ enumCheckMethod[formData.check_method] }}</div>
      </el-form-item>
      <el-form-item label="检查类型：">
        <div>{{ enumCheckType[formData.check_type] }}</div>
      </el-form-item>
      <el-form-item label="检查内容：">
        <div>{{ formData.check_des }}</div>
      </el-form-item>
      <el-form-item label="检查结论：">
        <div>{{ formData.check_result }}</div>
      </el-form-item>
      <el-form-item label="处理措施：">
        <div>{{ formData.handle_des }}</div>
      </el-form-item>
      <el-form-item label="附件：">
        <div v-if="!attachImages.length">
          <div class="p-5 text-center text-muted border rounded bg-light">暂无附件</div>
        </div>
        <img-card :images="attachImages"></img-card>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { arrayFromString } from '@vimi/utils-tool'
import ImgCard from '@/components/ImgCard'
import { enumCheckMethod, enumCheckType } from '@/credit/views/city/self/after/enum'
export default {
  components: {
    ImgCard,
  },
  props: {
    formData: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      enumCheckMethod,
      enumCheckType,
    }
  },
  computed: {
    attachImages() {
      return arrayFromString(this.formData.check_attachment)
    },
  },

  created() {},
  methods: {},
}
</script>
<style lang="scss" scoped></style>
